﻿using System;
using Microsoft.Xna.Framework;

namespace Jage.Logic.Crud
{
    public class SpriteSource
    {

        public static Data.SpriteSource GetNew(Guid spritesheetId, int sortIndex, string resource, int width, int height, Rectangle crop)
        {
            return new Data.SpriteSource() { SpriteSourceId = Guid.NewGuid(), SortIndex = sortIndex, Resource = resource, SpritesheetId = spritesheetId, Width = width, Height = height, OriginX = width / 2, OriginY = height / 2, CropX = crop.X, CropY = crop.Y, CropWidth = crop.Width, CropHeight = crop.Height };
        }

    }
}
